package com.woniu.outpatient.service.impl;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.woniu.hospital.domain.Hosptilnews;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.woniu.outpatient.mapper.ChecksMapper;
import com.woniu.outpatient.domain.Checks;
import com.woniu.outpatient.service.IChecksService;

/**
 * 检查名称表Service业务层处理
 *
 * @author wolf-six
 * @date 2023-02-15
 */
@Service
public class ChecksServiceImpl implements IChecksService {
    @Autowired
    private ChecksMapper checksMapper;

    /**
     * 查询检查名称表
     *
     * @param checkId 检查名称表主键
     * @return 检查名称表
     */
    @Override
    public Checks selectChecksByCheckId(Long checkId)
    {
        return checksMapper.selectChecksByCheckId(checkId);
    }

    @Override
    public Checks getIdByName(String checkName) {
        Checks idByName = checksMapper.getIdByName(checkName);

        return idByName;
    }

    @Override
    public List<Checks> showAllChecks() {
        return checksMapper.showAllChecks();
    }

    /**
     * 查询检查名称表列表
     *
     * @param checks 检查名称表
     * @return 检查名称表
     */
    @Override
    public List<Checks> selectChecksList(Checks checks)
    {
        return checksMapper.selectChecksList(checks);
    }

    /**
     * 新增检查名称表
     *
     * @param checks 检查名称表
     * @return 结果
     */
    @Override
    public int insertChecks(Checks checks)
    {
        return checksMapper.insertChecks(checks);
    }

    /**
     * 修改检查名称表
     *
     * @param checks 检查名称表
     * @return 结果
     */
    @Override
    public int updateChecks(Checks checks)
    {
        return checksMapper.updateChecks(checks);
    }

    /**
     * 批量删除检查名称表
     *
     * @param checkIds 需要删除的检查名称表主键
     * @return 结果
     */
    @Override
    public int deleteChecksByCheckIds(Long[] checkIds)
    {
        return checksMapper.deleteChecksByCheckIds(checkIds);
    }

    /**
     * 删除检查名称表信息
     *
     * @param checkId 检查名称表主键
     * @return 结果
     */
    @Override
    public int deleteChecksByCheckId(Long checkId)
    {
        return checksMapper.deleteChecksByCheckId(checkId);
    }

    @Override
    public BigDecimal checkAmount(Long patientId) {
        return checksMapper.checkAmount(patientId);
    }
}
